

<form method="post" action="<?php echo url_for("@stats_filter"); ?>">
  <?php echo $filter; ?>
  <input type="submit">
</form>